1. Field of the Invention
This invention relates to image processing, and in particular, it relates to deblurring and binarizing of a scanned grayscale image.
2. Description of Related Art
A print-and-scan process refers to a process in which an original digital image is printed on a recording medium (e.g. paper), and then scanned back to obtain a scanned digital image. During a print-an-scan process, some deformations, such as blurring and non-uniform intensity, are inevitably introduced.
In some document processing applications, such as printing and scanning (PAS) quality evaluation, document authentication, etc., it is desirable to obtain a document image after PAS that is as close to the original image as possible. In the simple scenario where the original image is binary and the scanned image is in grayscale, the problem becomes how to binarize the scanned image to obtain the best match of the original image. There are numerous thresholding methods in the literature. See, for example, Sezgin M, Sankur B, Survey over image thresholding techniques and quantitative performance evaluation, J Electron Imag. 13: 146-165 (2004) (hereinafter “Sezgin et al.”). However, none of them utilizes the known original image in obtaining a binary image from the PAS process as its best match. Conventional thresholding algorithms such as Kittler's and Otsu's methods often fail to provide desired results.
According to Sezgin et al., Kittler and Illingworth's minimum error thresholding method (referred to as Kittler's method in this disclosure) was ranked the best binary thresholding algorithm for their non-destructive testing image set and document image set. Kittler's method assumes that the object (foreground) and background intensities follow Gaussian distributions and iteratively searches for a threshold that gives minimum classification error. See Kittler J, Illingworth J, Minimum error thresholding. Pattern Recogn. 19:41-47 (1985) (hereinafter “Kittler et al.”). However, the Gaussian assumption may not be valid in some scanned grayscale document images. For example, a scanned grayscale document image may contain illumination noise introduced in the scanning process. When a scanned grayscale document image is substantially free of non-uniform illumination noise, Kittler's method can provide decent results in the binarized image. However, when significant non-uniform illumination noise is present, Kittler's method often fails to accomplish meaningful thresholding, resulting in the illumination noise spot being converted into a large dark (black) spot which obscures the document content.
Otsu's method is essentially a mean-square clustering technique. It minimizes (maximizes) the weighted sum of within-class (between-class) variances of the object and background pixels to find an optimal threshold. See Otsu N, A threshold selection method from gray level histograms, IEEE Trans Syst Man Cybern. 9: 62-66 (1979) (“Otsu”). Otsu's method ranked much lower than Kittler's method in the aforementioned performance comparison in Sezgin et al., but its performance is often satisfactory for images with and without significant non-uniform illumination noise.
Due to localized distortions of document images during PAS in addition to global degradations (see Baird H S, The state of the art document image degradation modeling, in Digital Document Processing: Major Directions and Recent Advances, Chaudhuri B B (Ed), Springer, NY. 261-279 (2007)), for example, distortions caused by non-uniform illuminations or shadows during scanning, it has been suggested that locally adaptive thresholding methods are better suited for PAS document images.
Using the locally adaptive Otsu's method, one can obtain perceptually satisfactory thresholding result from an 8-bit grayscale document image after PAS. However, compared to the original image, the binarized document image from PAS tends to have fatter (thicker) objects, indicating that the adaptive Otsu's method gives threshold value greater than the ideal threshold if the ultimate goal is to match the binarized document image to the corresponding original image. With different PAS apparatuses and settings, the opposite may happen as well, that is, the Otsu's algorithm may result in thinner objects than those in the original image.